<script setup lang="ts">
const sitemapUrl = "https://wenan.haoyupay.com/sitemap.txt"

if (process.client) {
  //@ts-ignore
  if (typeof window._hmt === 'undefined') {
    //@ts-ignore
    window._hmt = [];
  }

  // 确保 dataLayer 数组已初始化
  //@ts-ignore
  window.dataLayer = window.dataLayer || [];

  // 定义 gtag 函数
  function gtag() {
    //@ts-ignore
    window.dataLayer.push(arguments);
  }

  // 记录脚本加载时间和配置 Google Analytics
  //@ts-ignore
  gtag('js', new Date());
  //@ts-ignore
  gtag('config', 'G-SQK6PMGMS3');
}
</script>

<template>
  <div class="w-full h-px bg-gray-200 dark:bg-gray-800 flex items-center justify-center">
    <div class="bg-white dark:bg-gray-900 px-4">
      <svg width="264" height="264" viewBox="0 0 264 264" fill="none" xmlns="http://www.w3.org/2000/svg"
           class="w-5 h-5">
        <path
            d="M146.496 211.2H234.822C237.627 211.2 240.383 210.468 242.813 209.078C245.242 207.688 247.259 205.688 248.662 203.279C250.064 200.871 250.801 198.139 250.8 195.359C250.799 192.579 250.059 189.847 248.655 187.44L189.337 85.612C187.935 83.2043 185.918 81.2049 183.489 79.8147C181.06 78.4246 178.305 77.6927 175.5 77.6927C172.695 77.6927 169.94 78.4246 167.511 79.8147C165.082 81.2049 163.065 83.2043 161.663 85.612L146.496 111.666L116.841 60.7179C115.438 58.3104 113.42 56.3113 110.991 54.9214C108.561 53.5315 105.805 52.7998 103 52.7998C100.195 52.7998 97.4386 53.5315 95.0089 54.9214C92.5793 56.3113 90.5615 58.3104 89.1583 60.7179L15.3453 187.44C13.9411 189.847 13.2012 192.579 13.2 195.359C13.1987 198.139 13.9363 200.871 15.3384 203.279C16.7405 205.688 18.7578 207.688 21.1873 209.078C23.6168 210.468 26.3728 211.2 29.1783 211.2H84.6219C106.589 211.2 122.789 201.636 133.937 182.979L161 136.526L175.496 111.666L219 186.34H161L146.496 211.2ZM83.7181 186.314L45.0255 186.306L103.026 86.7466L131.966 136.526L112.589 169.798C105.186 181.904 96.7763 186.314 83.7181 186.314Z"
            fill="currentColor"></path>
      </svg>
    </div>
  </div>
  <footer class="relative">
    <div
        class="mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl py-8 lg:py-4 lg:flex lg:items-center lg:justify-between lg:gap-x-3">

      <div class="lg:flex-1 flex items-center justify-center lg:justify-end gap-x-1.5 lg:order-3">
        <NuxtLink
            :href="sitemapUrl" target="_blank"
            class="focus:outline-none focus-visible:outline-0 disabled:cursor-not-allowed disabled:opacity-75 flex-shrink-0 font-medium rounded-md text-sm gap-x-1.5 p-1.5 text-gray-700 dark:text-gray-200 hover:text-gray-900 dark:hover:text-white hover:bg-gray-50 dark:hover:bg-gray-800 focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-primary-500 dark:focus-visible:ring-primary-400 inline-flex items-center"
            aria-label="Nuxt UI on GitHub">
          网站地图
        </NuxtLink>
      </div>
      <div class="mt-3 lg:mt-0 lg:order-2 flex items-center justify-center">
        <div class="flex items-center justify-center lg:justify-start lg:flex-1 gap-x-1.5 mt-3 lg:mt-0 lg:order-1">
          <p
              class="text-sm text-gray-500 dark:text-gray-400"> Copyright © 2020-present <span
              class="text-gray-900 dark:text-white">小熊文案馆</span></p></div>
      </div>
    </div>
  </footer>
</template>

<style scoped>

</style>